<template>
  <section class="config-wechat">
    <section class="set-info">
      <el-collapse accordion>
        <el-collapse-item>
          <template
            slot="title"
          >企业信息</template>
          <el-row :gutter="20">
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业名称：</span>
                <span class="item-content">{{ obj.enterpriseName || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">社会统一信用代码：</span>
                <span class="item-content">{{ obj.enterpriseCode || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">有效期：</span>
                <span
                  class="item-content"
                >{{ obj.startDate ? obj.startDate.substring(0, 10) : '' }} --
                  {{ obj.endDate ? obj.endDate.substring(0, 10) : '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业电话：</span>
                <span class="item-content">{{
                  obj.enterpriseTelephone || ''
                }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业邮箱：</span>
                <span class="item-content">{{
                  obj.enterpriseEmail || ''
                }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">所在地区：</span>
                <span class="item-content">{{ obj.regionId || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">企业网址：</span>
                <span class="item-content">{{
                  obj.enterpriseWebsite || ''
                }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">系统主地址：</span>
                <span class="item-content">{{ obj.systemUrl1 || '' }}</span>
              </section>
            </el-col>
            <el-col :span="8">
              <section class="info-item">
                <span class="item-label">系统备用地址：</span>
                <span class="item-content">{{ obj.systemUrl2 || '' }}</span>
              </section>
            </el-col>
            <el-col :span="24">
              <section class="info-item">
                <span class="item-label">企业地址：</span>
                <span class="item-content">{{
                  obj.enterpriseAddress || ''
                }}</span>
              </section>
            </el-col>
            <el-col :span="24">
              <section class="info-item">
                <span class="item-label">企业简介：</span>
                <span class="item-content">{{
                  obj.enterpriseAboutus || ''
                }}</span>
              </section>
            </el-col>

            <el-col :span="24">
              <section class="info-item">
                <span class="item-label">备注：</span>
                <span class="item-content">{{ obj.remark || '' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员姓名：</span>
                <span class="item-content">{{ obj.userRealname || '' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员手机号：</span>
                <span class="item-content">{{ obj.userPhone || '' }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员性别：</span>
                <span class="item-content">{{
                  obj.userSex === 'MAN' ? '男' : '女'
                }}</span>
              </section>
            </el-col>
            <el-col :span="6">
              <section class="info-item">
                <span class="item-label">管理员邮箱：</span>
                <span class="item-content">{{ obj.userEmail || '' }}</span>
              </section>
            </el-col>
          </el-row>
        </el-collapse-item>
      </el-collapse>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            <span class="name">微信对接配置</span>
            <el-tag
              size="mini"
            >是否对接微信：{{
              form.appidTime ? '上次设置时间-' + form.appidTime : '未设置'
            }}</el-tag>
            <template v-if="form.wechat !== 'NO'">
              <el-tag
                size="mini"
              >appid：{{
                form.appidTime ? '上次设置时间-' + form.appidTime : '未设置'
              }}</el-tag>
              <el-tag
                size="mini"
              >密钥：{{
                form.secretTime ? '上次设置时间-' + form.secretTime : '未设置'
              }}</el-tag>
            </template>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="100px">
              <el-form-item label="是否对接微信">
                <el-radio-group v-model="form.wechat">
                  <el-radio label="NO">否</el-radio>
                  <el-radio label="YES">服务号</el-radio>
                  <el-radio label="NON">订阅号</el-radio>
                </el-radio-group>
                <el-button
                  :loading="loading4wechat"
                  type="primary"
                  style="margin-left: 10px;"
                  @click="handleComit('wechat')"
                >确 定
                </el-button>
              </el-form-item>
              <template v-if="form.wechat !== 'NO'">
                <el-form-item label="appid">
                  <el-input
                    v-model.trim="form.appid"
                    placeholder="请输入appid"
                    style="width: 50%;"
                  />
                  <el-button
                    :loading="loading4appid"
                    type="primary"
                    style="margin-left: 10px;"
                    @click="handleComit('appid')"
                  >确 定
                  </el-button>
                </el-form-item>
                <el-form-item label="密钥">
                  <el-input
                    v-model.trim="form.secret"
                    placeholder="请输入密钥"
                    style="width: 50%;"
                  />
                  <el-button
                    :loading="loading4secret"
                    type="primary"
                    style="margin-left: 10px;"
                    @click="handleComit('secret')"
                  >确 定
                  </el-button>
                </el-form-item>
              </template>
              <section v-if="form.wechat !== 'NO'" class="inner-explain">
                <i class="el-icon-warning-outline" />
                <section>
                  <p>1、设置微信网页授权appid。</p>
                  <p>2、设置微信网页授权密钥。</p>
                </section>
              </section>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            <span class="name">账务对接配置</span>
            <el-tag
              size="mini"
            >商户号：{{
              form.faccountTime
                ? '上次设置时间-' + form.faccountTime
                : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >公钥：{{
              form.fpubkeyTime ? '上次设置时间-' + form.fpubkeyTime : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >私钥：{{
              form.fprikeyTime ? '上次设置时间-' + form.fprikeyTime : '未设置'
            }}</el-tag>
            <el-tag size="mini">...</el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="160px">
              <el-form-item label="商户号">
                <el-input
                  v-model.trim="form.faccount"
                  placeholder="请输入商户号"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4faccount"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('faccount')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.faccountTime
                    ? '上次设置时间-' + form.faccountTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="公钥">
                <el-input
                  v-model.trim="form.fpubkey"
                  type="textarea"
                  :autosize="{ minRows: 8, maxRows: 8 }"
                  placeholder="请输入公钥"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4fpubkey"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('fpubkey')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.fpubkeyTime
                    ? '上次设置时间-' + form.fpubkeyTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="私钥">
                <el-input
                  v-model.trim="form.fprikey"
                  type="textarea"
                  :autosize="{ minRows: 8, maxRows: 8 }"
                  placeholder="请输入私钥"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4fprikey"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('fprikey')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.fprikeyTime
                    ? '上次设置时间-' + form.fprikeyTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <!-- <el-form-item label="企业红包帐号">
                <el-input v-model.trim="form.waccount" placeholder="请输入企业红包帐号" style="width: 50%;" />
                <el-button :loading="loading4waccount" type="primary" style="margin-left: 10px;margin-right: 10px;" @click="handleComit('waccount')">确 定</el-button>
                <el-tag size="mini">{{ form.waccountTime ? '上次设置时间-'+ form.waccountTime : '未设置' }}</el-tag>
              </el-form-item>
              <el-form-item label="企业红包账户名称">
                <el-input v-model.trim="form.waccountname" placeholder="请输入企业红包账户名称" style="width: 50%;" />
                <el-button :loading="loading4wan" type="primary" style="margin-left: 10px;margin-right: 10px;" @click="handleComit('waccountname')">确 定</el-button>
                <el-tag size="mini">{{ form.waccountnameTime ? '上次设置时间-'+ form.waccountnameTime : '未设置' }}</el-tag>
              </el-form-item> -->
              <el-form-item label="个人开户地址">
                <el-input
                  v-model.trim="form.foa"
                  placeholder="请输入个人开户地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4foa"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('foa')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.foaTime ? '上次设置时间-' + form.foaTime : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="个人开户结果接收地址">
                <el-input
                  v-model.trim="form.fra"
                  placeholder="请输入个人开户结果接收地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4fra"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('fra')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.fraTime ? '上次设置时间-' + form.fraTime : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="钱包个人中心地址">
                <el-input
                  v-model.trim="form.fwa"
                  placeholder="请输入钱包个人中心地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4fwa"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('fwa')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.fwaTime ? '上次设置时间-' + form.fwaTime : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="线下福利包二维码回调地址">
                <el-input
                  v-model.trim="form.fback"
                  placeholder="请输入钱包个人中心地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4fback"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('fback')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.fbackTime ? '上次设置时间-' + form.fbackTime : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="线下福利包二维码跳转地址">
                <el-input
                  v-model.trim="form.fjump"
                  placeholder="请输入钱包个人中心地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4fjump"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('fjump')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.fjumpTime ? '上次设置时间-' + form.fjumpTime : '未设置'
                }}</el-tag>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>

      <section class="set-card">
        <el-collapse accordion>
          <el-collapse-item>
            <template slot="title">
              <span class="name">商城对接配置</span>
              <el-tag
                size="mini"
              >商户号：{{
                form.mallaccountTime
                  ? '上次设置时间-' + form.mallaccountTime
                  : '未设置'
              }}</el-tag>
              <el-tag
                size="mini"
              >公钥：{{
                form.pubkeyTime ? '上次设置时间-' + form.pubkeyTime : '未设置'
              }}</el-tag>
              <el-tag
                size="mini"
              >私钥：{{
                form.prikeyTime ? '上次设置时间-' + form.prikeyTime : '未设置'
              }}</el-tag>
              <el-tag size="mini">...</el-tag>
            </template>
            <section class="card-inner">
              <el-form :model="form" label-position="right" label-width="140px">
                <el-form-item label="商户号">
                  <el-input
                    v-model.trim="form.mallaccount"
                    placeholder="请输入企业商户号"
                    style="width: 50%;"
                  />
                  <el-button
                    :loading="loading4mallaccount"
                    type="primary"
                    style="margin-left: 10px;margin-right: 10px;"
                    @click="handleComit('mallaccount')"
                  >确 定
                  </el-button>
                  <el-tag size="mini">{{
                    form.mallaccountTime
                      ? '上次设置时间-' + form.mallaccountTime
                      : '未设置'
                  }}</el-tag>
                </el-form-item>
                <el-form-item label="公钥">
                  <el-input
                    v-model.trim="form.pubkey"
                    type="textarea"
                    :autosize="{ minRows: 8, maxRows: 8 }"
                    placeholder="请输入公钥"
                    style="width: 50%;"
                  />
                  <el-button
                    :loading="loading4pubkey"
                    type="primary"
                    style="margin-left: 10px;margin-right: 10px;"
                    @click="handleComit('pubkey')"
                  >确 定
                  </el-button>
                  <el-tag size="mini">{{
                    form.pubkeyTime
                      ? '上次设置时间-' + form.pubkeyTime
                      : '未设置'
                  }}</el-tag>
                </el-form-item>
                <el-form-item label="私钥">
                  <el-input
                    v-model.trim="form.prikey"
                    type="textarea"
                    :autosize="{ minRows: 8, maxRows: 8 }"
                    placeholder="请输入私钥"
                    style="width: 50%;"
                  />
                  <el-button
                    :loading="loading4prikey"
                    type="primary"
                    style="margin-left: 10px;margin-right: 10px;"
                    @click="handleComit('prikey')"
                  >确 定
                  </el-button>
                  <el-tag size="mini">{{
                    form.prikeyTime
                      ? '上次设置时间-' + form.prikeyTime
                      : '未设置'
                  }}</el-tag>
                </el-form-item>
                <el-form-item label="商城地址">
                  <el-input
                    v-model.trim="form.malladdress"
                    placeholder="请输入商城地址"
                    style="width: 50%;"
                  />
                  <el-button
                    :loading="loading4malladdress"
                    type="primary"
                    style="margin-left: 10px;margin-right: 10px;"
                    @click="handleComit('malladdress')"
                  >确 定
                  </el-button>
                  <el-tag size="mini">{{
                    form.malladdressTime
                      ? '上次设置时间-' + form.malladdressTime
                      : '未设置'
                  }}</el-tag>
                </el-form-item>
<!--                <el-form-item label="商城订单跳转地址">-->
<!--                  <el-input-->
<!--                      v-model.trim="form.mallOrderAddress"-->
<!--                      placeholder="请输入商城订单跳转地址"-->
<!--                      style="width: 50%;"-->
<!--                  />-->
<!--                  <el-button-->
<!--                      :loading="loading4mallOrderAddress"-->
<!--                      type="primary"-->
<!--                      style="margin-left: 10px;margin-right: 10px;"-->
<!--                      @click="handleComit('mallOrderAddress')"-->
<!--                  >确 定-->
<!--                  </el-button>-->
<!--                  <el-tag size="mini">{{-->
<!--                      form.mallOrderAddressTime-->
<!--                          ? '上次设置时间-' + form.mallOrderAddressTime-->
<!--                          : '未设置'-->
<!--                    }}</el-tag>-->
<!--                </el-form-item>-->
              </el-form>
            </section>
          </el-collapse-item>
        </el-collapse>
      </section>
    </section>

    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            <span class="name">短信对接配置</span>
            <el-tag
              size="mini"
            >短信接口地址：{{
              form.smsserverTime
                ? '上次设置时间-' + form.smsserverTime
                : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >短信验证码模板编号：{{
              form.smstemcodeTime
                ? '上次设置时间-' + form.smstemcodeTime
                : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >短信验证码有效时间：{{
              form.smstimeTime ? '上次设置时间-' + form.smstimeTime : '未设置'
            }}</el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="180px">
              <el-form-item label="短信接口地址">
                <el-input
                  v-model.trim="form.smsserver"
                  placeholder="请输入短信接口地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4smsserver"
                  type="primary"
                  style="margin-left: 10px;"
                  @click="handleComit('smsserver')"
                >确 定
                </el-button>
              </el-form-item>
              <el-form-item label="短信验证码模板编号">
                <el-input
                  v-model.trim="form.smstemcode"
                  placeholder="请输入短信验证码模板编号"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4smstemcode"
                  type="primary"
                  style="margin-left: 10px;"
                  @click="handleComit('smstemcode')"
                >确 定
                </el-button>
              </el-form-item>
              <el-form-item label="短信验证码有效时间（秒）">
                <el-input
                  v-model.trim="form.smstime"
                  placeholder="请输入短信验证码有效时间（秒）"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4smstime"
                  type="primary"
                  style="margin-left: 10px;"
                  @click="handleComit('smstime')"
                >确 定
                </el-button>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            <span class="name">退款信息配置</span>
            <el-tag
              size="mini"
            >红包到期退款天数：{{
              form.reddayTime ? '上次设置时间-' + form.reddayTime : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >红包退款回调地址 ：{{
              form.backurlTime ? '上次设置时间-' + form.backurlTime : '未设置'
            }}</el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="180px">
              <el-form-item label="红包到期退款天数">
                <el-input
                  v-model.trim="form.redday"
                  placeholder="请输入红包到期退款天数"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4redday"
                  type="primary"
                  style="margin-left: 10px;"
                  @click="handleComit('redday')"
                >确 定
                </el-button>
              </el-form-item>
              <el-form-item label="红包退款回调地址">
                <el-input
                  v-model.trim="form.backurl"
                  placeholder="请输入红包退款回调地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4backurl"
                  type="primary"
                  style="margin-left: 10px;"
                  @click="handleComit('backurl')"
                >确 定
                </el-button>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
    <section class="set-card">
      <el-collapse accordion>
        <el-collapse-item>
          <template slot="title">
            <span class="name">惠福商城对接配置</span>
            <el-tag
              size="mini"
            >惠福商城ID：{{
              form.hfIDTime ? '上次设置时间-' + form.hfIDTime : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >惠福商城公钥：{{
              form.hfpubkeyTime
                ? '上次设置时间-' + form.hfpubkeyTime
                : '未设置'
            }}</el-tag>
            <el-tag
              size="mini"
            >惠福商城私钥：{{
              form.hfprikeyTime
                ? '上次设置时间-' + form.hfprikeyTime
                : '未设置'
            }}</el-tag>
            <el-tag size="mini">...</el-tag>
          </template>
          <section class="card-inner">
            <el-form :model="form" label-position="right" label-width="200px">
              <el-form-item label="惠福商城ID">
                <el-input
                  v-model.trim="form.hfID"
                  placeholder="请输入惠福商城ID"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfID"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfID')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfIDTime ? '上次设置时间-' + form.hfIDTime : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城公钥">
                <el-input
                  v-model.trim="form.hfpubkey"
                  type="textarea"
                  :autosize="{ minRows: 8, maxRows: 8 }"
                  placeholder="请输入惠福商城公钥"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfpubkey"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfpubkey')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfpubkeyTime
                    ? '上次设置时间-' + form.hfpubkeyTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城私钥">
                <el-input
                  v-model.trim="form.hfprikey"
                  type="textarea"
                  :autosize="{ minRows: 8, maxRows: 8 }"
                  placeholder="请输入惠福商城私钥"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfprikey"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfprikey')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfprikeyTime
                    ? '上次设置时间-' + form.hfprikeyTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城首页地址">
                <el-input
                  v-model.trim="form.hfIndexMalladdress"
                  placeholder="请输入惠福商城首页地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfIndexMalladdress"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfIndexMalladdress')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfIndexMalladdressTime
                    ? '上次设置时间-' + form.hfIndexMalladdressTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城免密登录地址">
                <el-input
                  v-model.trim="form.hfNoPwdLoginAddress"
                  placeholder="请输入惠福商城免密登录地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfNoPwdLoginAddress"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfNoPwdLoginAddress')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfNoPwdLoginAddressTime
                    ? '上次设置时间-' + form.hfNoPwdLoginAddressTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城订单地址">
                <el-input
                  v-model.trim="form.hfOrderMalladdress"
                  placeholder="请输入惠福商城订单地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfhfOrderMalladdress"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfOrderMalladdress')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfOrderMalladdressTime
                    ? '上次设置时间-' + form.hfOrderMalladdressTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城接口地址">
                <el-input
                  v-model.trim="form.hfmalladdress"
                  placeholder="请输入惠福商城接口地址"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfmalladdress"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfmalladdress')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfmalladdressTime
                    ? '上次设置时间-' + form.hfmalladdressTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
              <el-form-item label="惠福商城系统名称">
                <el-input
                  v-model.trim="form.hfmallbackaddress"
                  placeholder="请输入惠福商城系统名称"
                  style="width: 50%;"
                />
                <el-button
                  :loading="loading4hfmallbackaddress"
                  type="primary"
                  style="margin-left: 10px;margin-right: 10px;"
                  @click="handleComit('hfmallbackaddress')"
                >确 定
                </el-button>
                <el-tag size="mini">{{
                  form.hfmallbackaddressTime
                    ? '上次设置时间-' + form.hfmallbackaddressTime
                    : '未设置'
                }}</el-tag>
              </el-form-item>
            </el-form>
          </section>
        </el-collapse-item>
      </el-collapse>
    </section>
  </section>
</template>
<script>
import { setDataByType, getEnterpriseInfo, getDataByType } from './../api'

export default {
  name: 'ConfigWechat',
  data() {
    return {
      loading4appid: false,
      loading4secret: false,
      loading4wechat: false,
      loading4waccount: false,
      loading4wan: false,
      loading4mallaccount: false,
      loading4pubkey: false,
      loading4prikey: false,
      loading4faccount: false,
      loading4fpubkey: false,
      loading4fprikey: false,
      loading4foa: false,
      loading4fra: false,
      loading4fwa: false,
      loading4fback: false,
      loading4fjump: false,
      loading4malladdress: false,
      loading4mallOrderAddress:false,
      loading4smsserver: false,
      loading4smstemcode: false,
      loading4smstime: false,
      loading4redday: false,
      loading4backurl: false,
      loading4hfID: false,
      loading4hfpubkey: false,
      loading4hfprikey: false,
      loading4hfmalladdress: false,
      loading4hfIndexMalladdress: false,
      loading4hfNoPwdLoginAddress: false,
      loading4hfmallbackaddress: false,
      loading4hfhfOrderMalladdress: false,
      obj: {},
      form: {
        wechat: 'YES',
        wechatTime: '',
        appid: '',
        appidTime: '',
        secret: '', // 密钥
        secretTime: '',
        faccount: '', // 财务对接-商户号
        faccountTime: '',
        fpubkey: '', // 财务对接-公钥
        fpubkeyTime: '',
        fprikey: '', // 财务对接-私钥
        fprikeyTime: '',
        foa: '', // 财务对接-个人开户地址
        foaTime: '',
        fra: '', // 财务对接-个人开户结果接收地址
        fraTime: '',
        fwa: '', // 财务对接-钱包个人中心地址
        fwaTime: '',
        fback: '', // 财务对接-线下福利包二维码回调
        fbackTime: '',
        fjump: '', // 线下福利包二维码跳转地址
        fjumpTime: '',
        waccount: '', // 财务对接-企业红包帐号
        waccountTime: '',
        waccountname: '', // 财务对接-企业红包账户名称
        waccountnameTime: '',
        mallaccount: '',
        mallaccountTime: '',
        pubkey: '',
        pubkeyTime: '',
        prikey: '',
        prikeyTime: '',
        malladdress: '',
        malladdressTime: '',
        mallOrderAddress:'',
        mallOrderAddressTime:'',
        smsserver: '',
        smsserverTime: '',
        smstemcode: '',
        smstemcodeTime: '',
        smstime: '',
        smstimeTime: '',
        redday: '',
        reddayTime: '',
        backurl: '',
        backurlTime: '',
        hfIDTime: '', // 惠福商城ID设置时间
        hfpubkeyTime: '', // 惠福商城公钥设置时间
        hfprikeyTime: '', // 惠福商城私钥设置时间
        hfIndexMalladdressTime: '', // 惠福商城首页地址设置时间
        hfNoPwdLoginAddressTime: '', // 惠福免密登录地址设置时间
        hfmalladdressTime: '', // 惠福商城接口地址设置时间
        hfmallbackaddressTime: '', // 跳转惠福商城系统名称   设置时间
        hfID: '', // 惠福商城ID
        hfpubkey: '', // 惠福商城公钥
        hfprikey: '', // 惠福商城私钥
        hfIndexMalladdress: '', // 惠福商城首页地址
        hfNoPwdLoginAddress: '', // 惠福免密登录地址
        hfmalladdress: '', // 惠福商城接口地址
        hfmallbackaddress: '', // 跳转惠福商城系统名称
        hfOrderMalladdressTime: '', // 惠福商城订单地址时间
        hfOrderMalladdress: '' // 惠福商城订单地址
      }
    }
  },
  created() {
    this.getSystemData('appid')
    this.getSystemData('secret')
    this.getSystemData('wechat')
    this.getSystemData('faccount')
    this.getSystemData('fpubkey')
    this.getSystemData('fprikey')
    this.getSystemData('foa')
    this.getSystemData('fra')
    this.getSystemData('fwa')
    this.getSystemData('fback')
    this.getSystemData('fjump')
    this.getSystemData('waccount')
    this.getSystemData('waccountname')
    this.getSystemData('mallaccount')
    this.getSystemData('pubkey')
    this.getSystemData('prikey')
    this.getSystemData('malladdress')
    // this.getSystemData('mallOrderAddress')
    this.getSystemData('smsserver')
    this.getSystemData('smstemcode')
    this.getSystemData('smstime')
    this.getSystemData('redday')
    this.getSystemData('backurl')
    this.getSystemData('hfID')
    this.getSystemData('hfpubkey')
    this.getSystemData('hfprikey')
    this.getSystemData('hfIndexMalladdress')
    this.getSystemData('hfNoPwdLoginAddress')
    this.getSystemData('hfmalladdress')
    this.getSystemData('hfmallbackaddress')
    this.getSystemData('hfOrderMalladdress')
    this.getData()
  },
  methods: {
    handleComit(type) {
      let name = ''
      let value = ''
      switch (type) {
        case 'wechat':
          name = 'WECHAT_IS_JOIN'
          value = this.form.wechat
          this.loading4wechat = true
          break
        case 'appid':
          if (!this.form.appid) {
            this.$message({
              type: 'info',
              message: '请输入appid！'
            })
            return
          }
          name = 'WECHAT_APP_ID'
          value = this.form.appid
          this.loading4appid = true
          break
        case 'secret':
          if (!this.form.secret) {
            this.$message({
              type: 'info',
              message: '请输入密钥！'
            })
            return
          }
          name = 'WECHAT_APP_SECRET'
          value = this.form.secret
          this.loading4secret = true
          break
        case 'faccount':
          if (!this.form.faccount) {
            this.$message({
              type: 'info',
              message: '请输入商户号！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_FUMERCHANTNUM'
          value = this.form.faccount
          this.loading4faccount = true
          break
        case 'fpubkey':
          if (!this.form.fpubkey) {
            this.$message({
              type: 'info',
              message: '请输入公钥！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_PUBSIGNKEY'
          value = this.form.fpubkey
          this.loading4fpubkey = true
          break
        case 'fprikey':
          if (!this.form.fprikey) {
            this.$message({
              type: 'info',
              message: '请输入私钥！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_PRISIGNKEY'
          value = this.form.fprikey
          this.loading4fprikey = true
          break
        case 'waccount':
          if (!this.form.waccount) {
            this.$message({
              type: 'info',
              message: '请输入企业红包帐号！'
            })
            return
          }
          name = 'TRANSFER_PAYACCOUNT'
          value = this.form.waccount
          this.loading4waccount = true
          break
        case 'waccountname':
          if (!this.form.waccountname) {
            this.$message({
              type: 'info',
              message: '请输入企业红包账户名称！'
            })
            return
          }
          name = 'TRANSFER_PAYACCOUNTNAME'
          value = this.form.waccountname
          this.loading4wan = true
          break
        case 'foa':
          if (!this.form.foa) {
            this.$message({
              type: 'info',
              message: '请输入个人开户地址！'
            })
            return
          }
          name = 'OPEN_ACCOUNT_BACK_URL'
          value = this.form.foa
          this.loading4foa = true
          break
        case 'fra':
          if (!this.form.fra) {
            this.$message({
              type: 'info',
              message: '请输入个人开户结果接收地址！'
            })
            return
          }
          name = 'OPEN_ACCOUNT_BACKEND_URL'
          value = this.form.fra
          this.loading4fra = true
          break
        case 'fwa':
          if (!this.form.fwa) {
            this.$message({
              type: 'info',
              message: '请输入个人开户结果接收地址！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_UCENTER'
          value = this.form.fwa
          this.loading4fwa = true
          break
        case 'fback':
          if (!this.form.fback) {
            this.$message({
              type: 'info',
              message: '请输入线下福利包二维码回调地址！'
            })
            return
          }
          name = 'QRCODEAPPLY_BACKEND_URL'
          value = this.form.fback
          this.loading4fback = true
          break
        case 'fjump':
          if (!this.form.fjump) {
            this.$message({
              type: 'info',
              message: '线下福利包二维码跳转地址！'
            })
            return
          }
          name = 'QRCODEAPPLY_BACK_URL'
          value = this.form.fjump
          this.loading4fjump = true
          break
        case 'mallaccount':
          if (!this.form.mallaccount) {
            this.$message({
              type: 'info',
              message: '请输入企业商户号！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_SMALL_FUMERCHANTNUM'
          value = this.form.mallaccount
          this.loading4mallaccount = true
          break
        case 'pubkey':
          if (!this.form.pubkey) {
            this.$message({
              type: 'info',
              message: '请输入公钥！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_SMALL_PUBSIGNKEY'
          value = this.form.pubkey
          this.loading4pubkey = true
          break
        case 'prikey':
          if (!this.form.prikey) {
            this.$message({
              type: 'info',
              message: '请输入私钥！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_SMALL_PRISIGNKEY'
          value = this.form.prikey
          this.loading4prikey = true
          break
        case 'malladdress':
          if (!this.form.malladdress) {
            this.$message({
              type: 'info',
              message: '请输入商城地址！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_SMALL_URL'
          value = this.form.malladdress
          this.loading4malladdress = true
          break
        case 'mallOrderAddress':
          if (!this.form.mallOrderAddress) {
            this.$message({
              type: 'info',
              message: '请输入商城订单地址！'
            })
            return
          }
          name = 'TRANSFER_ACCOUNTS_SMALL_ORDER_URL'
          value = this.form.mallOrderAddress
          this.loading4mallOrderAddress = true
          break
        case 'smsserver':
          if (!this.form.smsserver) {
            this.$message({
              type: 'info',
              message: '请输入短信接口地址！'
            })
            return
          }
          name = 'SMS_SERVER'
          value = this.form.smsserver
          this.loading4smsserver = true
          break
        case 'smstemcode':
          if (!this.form.smstemcode) {
            this.$message({
              type: 'info',
              message: '请输入短信验证码模板编号！'
            })
            return
          }
          name = 'SMS_TEMPID_USER_CODE'
          value = this.form.smstemcode
          this.loading4smstemcode = true
          break
        case 'smstime':
          if (!this.form.smstime) {
            this.$message({
              type: 'info',
              message: '请输入短信验证码有效时间！'
            })
            return
          }
          name = 'SMS_TIME_EXPIRE'
          value = this.form.smstime
          this.loading4smstime = true
          break
        case 'redday':
          if (!this.form.redday) {
            this.$message({
              type: 'info',
              message: '请输入红包到期退款天数！'
            })
            return
          }
          name = 'REDPACKET_EXPIRE_REFUND_DAY '
          value = this.form.redday
          this.loading4redday = true
          break
        case 'backurl':
          if (!this.form.backurl) {
            this.$message({
              type: 'info',
              message: '请输入红包退款回调地址！'
            })
            return
          }
          name = 'REDPACKET_REFUND_BACKEND_URL'
          value = this.form.backurl
          this.loading4backurl = true
          break
        case 'hfID':
          if (!this.form.hfID) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城ID！'
            })
            return
          }
          name = 'HUIFU_MALL_ID'
          value = this.form.hfID
          this.loading4hfID = true
          break
        case 'hfpubkey':
          if (!this.form.hfpubkey) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城公钥！'
            })
            return
          }
          name = 'HUIFU_MALL_PUBSIGNKEY'
          value = this.form.hfpubkey
          this.loading4hfpubkey = true
          break
        case 'hfprikey':
          if (!this.form.hfprikey) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城私钥!'
            })
            return
          }
          name = 'HUIFU_MALL_PRISIGNKEY'
          value = this.form.hfprikey
          this.loading4hfprikey = true
          break
        case 'hfIndexMalladdress':
          if (!this.form.hfIndexMalladdress) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城首页地址!'
            })
            return
          }
          name = 'HUIFU_MALL_HOME_URL'
          value = this.form.hfIndexMalladdress
          this.loading4hfIndexMalladdress = true
          break
        case 'hfNoPwdLoginAddress':
          if (!this.form.hfNoPwdLoginAddress) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城免密登录地址!'
            })
            return
          }
          name = 'HUIFU_MALL_LOGIN_URL'
          value = this.form.hfNoPwdLoginAddress
          this.loading4hfNoPwdLoginAddress = true
          break
        case 'hfmalladdress':
          if (!this.form.hfmalladdress) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城接口地址!'
            })
            return
          }
          name = 'HUIFU_MALL_API_URL'
          value = this.form.hfmalladdress
          this.loading4hfmalladdress = true
          break
        case 'hfmallbackaddress':
          if (!this.form.hfmallbackaddress) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城系统名称!'
            })
            return
          }
          name = 'JUMP_HUIFU_MALL_SYS_NAME'
          value = this.form.hfmallbackaddress
          this.loading4hfmallbackaddress = true
          break
        case 'hfOrderMalladdress':
          if (!this.form.hfOrderMalladdress) {
            this.$message({
              type: 'info',
              message: '请输入惠福商城订单地址!'
            })
            return
          }
          name = 'HUIFU_MALL_ORDER_URL'
          value = this.form.hfOrderMalladdress
          this.loading4hfhfOrderMalladdress = true
          break
        default:
          break
      }
      return new Promise((resolve, reject) => {
        setDataByType({ configName: name, configValue: value })
          .then(res => {
            this.loading4appid = false
            this.loading4secret = false
            this.loading4wechat = false
            this.loading4waccount = false
            this.loading4wan = false
            this.loading4mallaccount = false
            this.loading4pubkey = false
            this.loading4prikey = false
            this.loading4faccount = false
            this.loading4fpubkey = false
            this.loading4fprikey = false
            this.loading4foa = false
            this.loading4fra = false
            this.loading4fwa = false
            this.loading4fback = false
            this.loading4fjump = false
            this.loading4malladdress = false
            this.loading4mallOrderAddress = false
            this.loading4smsserver = false
            this.loading4smstemcode = false
            this.loading4smstime = false
            this.loading4redday = false
            this.loading4backurl = false
            this.loading4hfID = false
            this.loading4hfpubkey = false
            this.loading4hfprikey = false
            this.loading4hfmalladdress = false
            this.loading4hfNoPwdLoginAddress = false
            this.loading4hfIndexMalladdress = false
            this.loading4hfmallbackaddress = false
            this.loading4hfhfOrderMalladdress = false
            this.$message({
              title: '成功',
              message: '设置成功',
              type: 'success',
              duration: 1500
            })
            this.getSystemData(type)
          })
          .catch(error => {
            this.loading4appid = false
            this.loading4secret = false
            this.loading4wechat = false
            this.loading4waccount = false
            this.loading4wan = false
            this.loading4mallaccount = false
            this.loading4pubkey = false
            this.loading4prikey = false
            this.loading4faccount = false
            this.loading4fpubkey = false
            this.loading4fprikey = false
            this.loading4foa = false
            this.loading4fra = false
            this.loading4fwa = false
            this.loading4fback = false
            this.loading4fjump = false
            this.loading4malladdress = false
            this.loading4mallOrderAddress = false
            this.loading4hfNoPwdLoginAddress = false
            this.loading4smsserver = false
            this.loading4smstemcode = false
            this.loading4smstime = false
            this.loading4redday = false
            this.loading4backurl = false
            reject(error)
          })
      })
    },

    getData() {
      const loading = this.$loading({
        lock: true,
        text: '请稍后',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.3)'
      })
      return new Promise((resolve, reject) => {
        getEnterpriseInfo()
          .then(res => {
            loading.close()
            this.obj = Object.assign({}, res.data.data)
          })
          .catch(error => {
            loading.close()
            reject(error)
          })
      })
    },

    getSystemData(type) {
      let name = ''
      switch (type) {
        case 'wechat':
          name = 'WECHAT_IS_JOIN'
          break
        case 'appid':
          name = 'WECHAT_APP_ID'
          break
        case 'secret':
          name = 'WECHAT_APP_SECRET'
          break
        case 'faccount':
          name = 'TRANSFER_ACCOUNTS_FUMERCHANTNUM'
          break
        case 'fpubkey':
          name = 'TRANSFER_ACCOUNTS_PUBSIGNKEY'
          break
        case 'fprikey':
          name = 'TRANSFER_ACCOUNTS_PRISIGNKEY'
          break
        case 'waccount':
          name = 'TRANSFER_PAYACCOUNT'
          break
        case 'waccountname':
          name = 'TRANSFER_PAYACCOUNTNAME'
          break
        case 'foa':
          name = 'OPEN_ACCOUNT_BACK_URL'
          break
        case 'fra':
          name = 'OPEN_ACCOUNT_BACKEND_URL'
          break
        case 'fwa':
          name = 'TRANSFER_ACCOUNTS_UCENTER'
          break
        case 'fback':
          name = 'QRCODEAPPLY_BACKEND_URL'
          break
        case 'fjump':
          name = 'QRCODEAPPLY_BACK_URL'
          break
        case 'mallaccount':
          name = 'TRANSFER_ACCOUNTS_SMALL_FUMERCHANTNUM'
          break
        case 'pubkey':
          name = 'TRANSFER_ACCOUNTS_SMALL_PUBSIGNKEY'
          break
        case 'prikey':
          name = 'TRANSFER_ACCOUNTS_SMALL_PRISIGNKEY'
          break
        case 'malladdress':
          name = 'TRANSFER_ACCOUNTS_SMALL_URL'
          break
        case 'mallOrderAddress':
          name = 'TRANSFER_ACCOUNTS_SMALL_ORDER_URL'
          break
        case 'smsserver':
          name = 'SMS_SERVER'
          break
        case 'smstemcode':
          name = 'SMS_TEMPID_USER_CODE'
          break
        case 'smstime':
          name = 'SMS_TIME_EXPIRE'
          break
        case 'redday':
          name = 'REDPACKET_EXPIRE_REFUND_DAY'
          break
        case 'backurl':
          name = 'REDPACKET_REFUND_BACKEND_URL'
          break
        case 'hfID':
          name = 'HUIFU_MALL_ID'
          break
        case 'hfpubkey':
          name = 'HUIFU_MALL_PUBSIGNKEY'
          break
        case 'hfprikey':
          name = 'HUIFU_MALL_PRISIGNKEY'
          break
        case 'hfIndexMalladdress':
          name = 'HUIFU_MALL_HOME_URL'
          break
        case 'hfNoPwdLoginAddress':
          name = 'HUIFU_MALL_LOGIN_URL'
          break
        case 'hfmalladdress':
          name = 'HUIFU_MALL_API_URL'
          break
        case 'hfmallbackaddress':
          name = 'JUMP_HUIFU_MALL_SYS_NAME'
          break
        case 'hfOrderMalladdress':
          name = 'HUIFU_MALL_ORDER_URL'
          break
        default:
          break
      }
      return new Promise((resolve, reject) => {
        getDataByType({ name: name })
          .then(res => {
            switch (type) {
              case 'wechat':
                this.form.wechat = res.data.data.configValue || ''
                this.form.wechatTime = res.data.data.updTime || ''
                break
              case 'appid':
                this.form.appid = res.data.data.configValue || ''
                this.form.appidTime = res.data.data.updTime || ''
                break
              case 'secret':
                this.form.secret = res.data.data.configValue || ''
                this.form.secretTime = res.data.data.updTime || ''
                break
              case 'faccount':
                this.form.faccount = res.data.data.configValue || ''
                this.form.faccountTime = res.data.data.updTime || ''
                break
              case 'fpubkey':
                this.form.fpubkey = res.data.data.configValue || ''
                this.form.fpubkeyTime = res.data.data.updTime || ''
                break
              case 'fprikey':
                this.form.fprikey = res.data.data.configValue || ''
                this.form.fprikeyTime = res.data.data.updTime || ''
                break
              case 'waccount':
                this.form.waccount = res.data.data.configValue || ''
                this.form.waccountTime = res.data.data.updTime || ''
                break
              case 'waccountname':
                this.form.waccountname = res.data.data.configValue || ''
                this.form.waccountnameTime = res.data.data.updTime || ''
                break
              case 'foa':
                this.form.foa = res.data.data.configValue || ''
                this.form.foaTime = res.data.data.updTime || ''
                break
              case 'fra':
                this.form.fra = res.data.data.configValue || ''
                this.form.fraTime = res.data.data.updTime || ''
                break
              case 'fwa':
                this.form.fwa = res.data.data.configValue || ''
                this.form.fwaTime = res.data.data.updTime || ''
                break
              case 'fback':
                this.form.fback = res.data.data.configValue || ''
                this.form.fbackTime = res.data.data.updTime || ''
                break
              case 'fjump':
                this.form.fjump = res.data.data.configValue || ''
                this.form.fjumpTime = res.data.data.updTime || ''
                break
              case 'mallaccount':
                this.form.mallaccount = res.data.data.configValue || ''
                this.form.mallaccountTime = res.data.data.updTime || ''
                break
              case 'pubkey':
                this.form.pubkey = res.data.data.configValue || ''
                this.form.pubkeyTime = res.data.data.updTime || ''
                break
              case 'prikey':
                this.form.prikey = res.data.data.configValue || ''
                this.form.prikeyTime = res.data.data.updTime || ''
                break
              case 'malladdress':
                this.form.malladdress = res.data.data.configValue || ''
                this.form.malladdressTime = res.data.data.updTime || ''
                break
              case 'mallOrderAddress':
                this.form.mallOrderAddress = res.data.data.configValue || ''
                this.form.mallOrderAddressTime = res.data.data.updTime || ''
                break

              case 'smsserver':
                this.form.smsserver = res.data.data.configValue || ''
                this.form.smsserverTime = res.data.data.updTime || ''
                break
              case 'smstemcode':
                this.form.smstemcode = res.data.data.configValue || ''
                this.form.smstemcodeTime = res.data.data.updTime || ''
                break
              case 'smstime':
                this.form.smstime = res.data.data.configValue || ''
                this.form.smstimeTime = res.data.data.updTime || ''
                break
              case 'redday':
                this.form.redday = res.data.data.configValue || ''
                this.form.reddayTime = res.data.data.updTime || ''
                break
              case 'backurl':
                this.form.backurl = res.data.data.configValue || ''
                this.form.backurlTime = res.data.data.updTime || ''
                break
              case 'hfID':
                this.form.hfID = res.data.data.configValue || ''
                this.form.hfIDTime = res.data.data.updTime || ''
                break
              case 'hfpubkey':
                this.form.hfpubkey = res.data.data.configValue || ''
                this.form.hfpubkeyTime = res.data.data.updTime || ''
                break
              case 'hfprikey':
                this.form.hfprikey = res.data.data.configValue || ''
                this.form.hfprikeyTime = res.data.data.updTime || ''
                break
              case 'hfIndexMalladdress':
                this.form.hfIndexMalladdress = res.data.data.configValue || ''
                this.form.hfIndexMalladdressTime = res.data.data.updTime || ''
                break
              case 'hfNoPwdLoginAddress':
                this.form.hfNoPwdLoginAddress = res.data.data.configValue || ''
                this.form.hfNoPwdLoginAddressTime = res.data.data.updTime || ''
                break
              case 'hfmalladdress':
                this.form.hfmalladdress = res.data.data.configValue || ''
                this.form.hfmalladdressTime = res.data.data.updTime || ''
                break
              case 'hfmallbackaddress':
                this.form.hfmallbackaddress = res.data.data.configValue || ''
                this.form.hfmallbackaddressTime = res.data.data.updTime || ''
                break
              case 'hfOrderMalladdress':
                this.form.hfOrderMalladdress = res.data.data.configValue || ''
                this.form.hfOrderMalladdressTime = res.data.data.updTime || ''
                break
              default:
                break
            }
          })
          .catch(error => {
            reject(error)
          })
      })
    }
  }
}
</script>
<style lang="scss">
.config-wechat {
  padding: 10px;
  min-height: calc(100vh - 60px);
  max-height: calc(100vh - 60px);
  overflow: hidden;

  &::-webkit-scrollbar {
    width: 8px; /*对垂直流动条有效*/
    height: 1px; /*对水平流动条有效*/
  }

  /** 滚动条轨道*/
  &::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
    background-color: white;
    border-radius: 3px;
  }

  /** 滚动条里面小方块*/
  &::-webkit-scrollbar-thumb {
    height: 32px;
    border-radius: 5px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
    background-color: #eaeaea;
  }

  &:hover {
    overflow: auto;
  }

  .set-info,
  .set-card {
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

    .el-collapse {
      border-top: none;
      border-bottom: none;

      .el-collapse-item__header {
        padding-left: 10px;
        border-bottom: none;
        overflow: hidden;
        text-overflow: ellipsis;

        .el-tag {
          margin-left: 10px;
        }

        .name {
          flex-shrink: 0;
          white-space: nowrap;
        }
      }

      .el-collapse-item__content {
        padding: 10px;
      }

      .el-collapse-item__wrap {
        border-bottom: none;
        border-top: 1px solid #e6ebf5;
      }
    }
  }

  .set-card {
    margin-top: 10px;
  }

  .set-info {
    .info-item {
      padding-bottom: 8px;
      vertical-align: top;
      display: flex;

      .item-label {
        color: rgba(0, 0, 0, 1);
        font-weight: 400;
        font-size: 14px;
        line-height: 1.5715;
        text-align: start;
      }

      .item-content {
        flex: 1 1;
        color: rgba(0, 0, 0, 0.85);
        font-size: 14px;
        line-height: 1.5715;
        word-break: break-word;
        overflow-wrap: break-word;
      }
    }
  }

  .color-inner {
    display: flex;
    align-items: center;

    .inner-item {
      width: 25px;
      height: 25px;
      margin-right: 8px;
      color: #fff;
      font-size: 20px;
      font-weight: 700;
      border-radius: 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;

      > i {
        display: none;
      }

      &.active i {
        display: inline-block;
      }
    }
  }

  .inner-txt {
    text-align: center;
    padding: 10px 0;
  }

  .inner-explain {
    margin-top: 10px;
    line-height: 1.1;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: flex-start;

    > i {
      margin-right: 5px;
    }

    p {
      margin: 0;
      padding: 0;
      margin-bottom: 5px;
    }
  }

  .inner-draggable {
    display: flex;
    justify-content: space-around;
    flex-direction: row;
    align-items: flex-start;

    .draggable-item {
    }
  }
}
</style>
